﻿<%@ Control Language="C#" AutoEventWireup="true" CodeFile="FlowEditor.ascx.cs" Inherits="Admin_LCAFlow_Controls_FlowEditor" %>
<%@ Register TagPrefix="uc" TagName="XhtmlEditor"  Src="/Admin/FormControls/XhtmlEditor.ascx" %>
<%@ Register TagPrefix="uc" TagName="ImageSelector"  Src="/Admin/FormControls/ImageSelector.ascx" %>

<style type="text/css">
    .footer-container
    {
        display: none;
    }
</style>
<h1><asp:Literal ID="litItemHeader" runat="server"/></h1>
<div class="flow-editor formview">
    <div class="section">
        <div class="section-title">
            General Information</div>
        <div class="row">
            <div class="label">
                Name</div>
            <div class="input">
                <asp:TextBox ID="txtName" runat="server" ClientIDMode="Static"></asp:TextBox>
                <asp:RequiredFieldValidator ID="vldName" ControlToValidate="txtName" 
                    ErrorMessage="Required" Display="Dynamic" SetFocusOnError="true" 
                    CssClass="errormessage" runat="server"></asp:RequiredFieldValidator>
            </div>
        </div>
        <div class="row">
            <div class="label">
                Description
            </div>
            <div class="input">
                 <uc:XhtmlEditor ID="rteDescription" Height="350px" Width="700px" runat="server" />
            </div>
        </div>
        <div class="row">
            <div class="label">
                Unit
            </div>
            <div class="input">
                 <asp:DropDownList runat="server" ID="ddlUnit" DataValueField="Id" DataTextField="Name"></asp:DropDownList>
            </div>
        </div>

        <div class="row">
            <div class="label">
                Picture
            </div>
            <div class="input">
                 <uc:ImageSelector ID="imgSelectorPicture" Width="350" runat="server"></uc:ImageSelector>
            </div>
        </div>
        <div class="row">
            <div class="label">
                TechnoSphere
            </div>
            <div class="input">
                 <asp:CheckBox ID="chkTechnoSphere" runat="server"></asp:CheckBox>
            </div>
        </div>
        <div class="row">
            <div class="label">
                Source
            </div>
            <div class="input">
                 <asp:TextBox ID="txtSource" runat="server" ClientIDMode="Static"></asp:TextBox>
            </div>
        </div>



        
        <div class="clear">
        </div>
    </div>
<%--    <div class="section">
        <div class="row">
            <asp:GridView CssClass="table table-condensed table-hover" runat="server" ID="grdImpactFactor"
                DataKeyNames="Id" AutoGenerateColumns="False" ClientIDMode="Static">
                <Columns>
                    <asp:BoundField HeaderText="Name" DataField="Name" ></asp:BoundField>
                    <asp:BoundField HeaderText="Emission" DataField="Emission" ></asp:BoundField>
                </Columns>
            </asp:GridView>
        </div>
    
    </div>--%>
<%--    <div class="section">
        <div class="section-title">
            Impact Assessment</div>
        <div class="row">
            <asp:Repeater runat="server" ID="rptImpacts" OnItemDataBound="rptImpacts_ItemDataBound">
                <ItemTemplate>
                    <div class="row">
                        <asp:HiddenField runat="server" ID="hdnId" />
                        <div class="label">
                            <asp:Literal runat="server" ID="litImpactName" /></div>
                        <div class="input">
                            <asp:TextBox ID="txtValue" runat="server"></asp:TextBox>
                            <asp:Label runat="server" ID="lblUnit"></asp:Label>
                              <asp:RegularExpressionValidator ID="vldValue" runat="server" ControlToValidate="txtValue" SetFocusOnError="true" 
                                ValidationExpression="^(?!0\d|$)\d*(\.\d{1,4})?$"
                                CssClass="errormessage field-validation-error" Display="Dynamic" ErrorMessage="Numbers only with 4 decimal places maximum"></asp:RegularExpressionValidator>
                        </div>
                    </div>
                </ItemTemplate>
            </asp:Repeater>
        </div>
        <div class="clear">
        </div>
    </div>--%>
    <div class="row">
        <asp:Button ID="btnSave" runat="server" Text="Save" OnClick="btnSave_Click" />
        <asp:Button ID="btnCancel" runat="server" Text="Cancel" OnClick="btnCancel_Click"
            CausesValidation="false" />
    </div>
</div>